Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Mac OSX + OpenJDK builds where JAVA_HOME contains libexec but not lib #119

Merged
merged 9 commits into from
Dec 18, 2023

Conversation

chipkent
Copy link
Member

@chipkent chipkent commented Dec 13, 2023

Fix Mac OSX + OpenJDK builds where JAVA_HOME contains libexec but not lib.
Build for Python 3.12

Resolves #118

@chipkent chipkent self-assigned this Dec 13, 2023
Copy link
Member

@devinrsmith devinrsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced this will actually produce usable wheels w/ libexec-based JDKs; see setup.py line 145,

library_dirs += [os.path.join(sys.exec_prefix, 'lib')]

jpyutil.py Outdated Show resolved Hide resolved
jpyutil.py Outdated Show resolved Hide resolved
jpyutil.py Outdated Show resolved Hide resolved
@chipkent
Copy link
Member Author

Here is how OpenJDK is installed by brew:

(venv312) ➜  jpy git:(pr-118-osx-openjdk-build) ✗ find /opt/homebrew/opt/openjdk@17/ -type d
/opt/homebrew/opt/openjdk@17/
/opt/homebrew/opt/openjdk@17//bin
/opt/homebrew/opt/openjdk@17//.brew
/opt/homebrew/opt/openjdk@17//libexec
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/_CodeSignature
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/scripting
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/scripting/jconsole-plugin
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/scripting/jconsole-plugin/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/management
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/management/FullThreadDump
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/management/FullThreadDump/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/management/JTop
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/management/JTop/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/management/VerboseGC
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/management/VerboseGC/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/management/MemoryMonitor
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/management/MemoryMonitor/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/FileChooserDemo
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/FileChooserDemo/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/Font2DTest
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/Font2DTest/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/TransparentRuler
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/TransparentRuler/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/Metalworks
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/Metalworks/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/TableExample
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/TableExample/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/SwingApplet
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/SwingApplet/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/SampleTree
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/SampleTree/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/Notepad
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/nbproject/jfc/Notepad/nbproject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/Stylepad
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/FileChooserDemo
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/Font2DTest
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/CodePointIM
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/TransparentRuler
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/SwingSet2
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/Metalworks
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/TableExample
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/SampleTree
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/Notepad
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/demo/jfc/J2Ddemo
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/man
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/man/man1
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/bin
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/include
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/include/darwin
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/lib
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/lib/security
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/lib/jfr
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/lib/server
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.management.rmi
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.unsupported.desktop
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.internal.vm.compiler.management
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.se
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.security.jgss
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jfr
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.management
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.security.sasl
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.net
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jsobject
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.zipfs
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.incubator.vector
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.dynalink
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.compiler
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.xml
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jcmd
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.naming.dns
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.instrument
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.localedata
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.naming.rmi
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.compiler
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.prefs
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.crypto.cryptoki
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.editpad
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.logging
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.management
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.internal.vm.compiler
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.base
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.net.http
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jpackage
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.internal.opt
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jconsole
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.sql.rowset
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.security.jgss
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.httpserver
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.naming
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.internal.jvmstat
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jartool
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.unsupported
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jdwp.agent
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.internal.le
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.internal.ed
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.scripting
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.attach
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.security.auth
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.xml.dom
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.charsets
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.sctp
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.rmi
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.smartcardio
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jstatd
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.transaction.xa
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.hotspot.agent
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jdi
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.javadoc
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jlink
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.incubator.foreign
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.nio.mapmode
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.sql
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.management.jfr
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.accessibility
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.datatransfer
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jshell
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.jdeps
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.desktop
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.random
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.crypto.ec
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.management.agent
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/java.xml.crypto
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/legal/jdk.internal.vm.ci
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/conf
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/conf/security
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/conf/security/policy
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/conf/security/policy/unlimited
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/conf/security/policy/limited
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/conf/management
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/Home/jmods
/opt/homebrew/opt/openjdk@17//libexec/openjdk.jdk/Contents/MacOS
/opt/homebrew/opt/openjdk@17//include
/opt/homebrew/opt/openjdk@17//share
/opt/homebrew/opt/openjdk@17//share/man
/opt/homebrew/opt/openjdk@17//share/man/man1

Copy link
Contributor

@jmao-denver jmao-denver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chipkent chipkent merged commit b502d4c into master Dec 18, 2023
27 checks passed
@chipkent chipkent deleted the pr-118-osx-openjdk-build branch December 18, 2023 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jpy will not build on Mac OSX if the installed JDK has a libexec directory and not a lib directory
3 participants